package com.lxp.basic.update;

import org.springframework.util.StringUtils;

import javax.sound.midi.Soundbank;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * @Author swd
 * @Create 2020/8/10 0010 13:47
 */
public class Update {
    public static void main(String[] args) {
        int[] array1 = new int[50];
        for (int i = 0; i < array1.length; i++) {
            array1[i] = i;
        }
        int[] array2 = new int[50];
        for (int i = 0; i < array2.length; i++) {
            array2[i] = array1[i];
        }
        System.out.println(Arrays.toString(array1));
        int[] array3 = new int[100];
        System.arraycopy(array1, 10, array3, 0, 20);
        System.out.println(Arrays.toString(array3));
    }

    public static native void arraycopy(Object src, int srcPos, Object dest, int destPos, int length);
}
